Updates to dice()
, slab()
, genSlabLabels()
#258
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are some updates that resolve some tasks from #115, and implements #229
Notably,
slab()
now usesdice()
so users will not get confused when they get a deprecation message RE:slice()
while usingslab()
. I have had several questions from users about this (essentially: how do I use dice() with slab()?)This PR has attempted to cover / ensure that the following are addressed:
fm = 0:z ~ .
results inz+1
slices (fixed insofar as they affectslab()
, I don't think it is fully fixed ondice()
side yet)slab()
, whether or notstrict=TRUE
slab_function()
a helper method for accessing the internal slab methods provided by the package; now used in method definitions rather than internal functions (could use more documentation on arguments/patterns for custom functions, and ensuring extra arguments all works)Hmisc::wtd.quantile()
, and support for custom weighted functions (such asweighted.mean()
)I am sure this has not yet caught everything, but I spent some time ensuring all the existing tests worked, and added some more that stress a few other features, as well as new tests for the now-implemented
weights
argument. It all appears to be functioning as expected in the test cases, though I bet there are still edge cases or un-tested use cases that still have issues.